function OrderDetailAssistant(argFromPusher) {
	this.order = argFromPusher.order;
}

OrderDetailAssistant.prototype = {
	order: null,
	setup: function() {
		Ares.setupSceneAssistant(this);
		var this1 = this;
		this.$.totalRow.setShowing(showPrice(user));
		var i = this.order.createdStr.search(/ \d\d:\d\d:\d\d/);
		var createdStr1 = this.order.createdStr.substring(0,i);
		var createdStr2 = this.order.createdStr.substring(i);
		this.$.createdLbl.setLabel(createdStr1 + "\n" + createdStr2);
		this.$.idLbl.setLabel(this.order.order_id);
		this.$.statusLbl.setLabel(this.order.order_status);
		this.$.totalLbl.setLabel(this.order.totalStr);
		var billInfo = "";
		if(this.order.billing_company) billInfo += this.order.billing_company + "\n";
		billInfo += this.order.billing_last_name + " " + this.order.billing_first_name + "\n";
		billInfo += this.order.billing_street1 + "\n";
		if(this.order.billing_street2) billInfo += this.order.billing_street2 + "\n";
		var billingZone = zones.filter(function(val){
			return val.zone_id == this1.order.billing_zone;
		})[0].zone_name;
		var billingCountry = countries.filter(function(val){
			return val.country_id == this1.order.billing_country;
		})[0].country_name;
		billInfo += this.order.billing_city + ", " + billingZone + " " + this.order.billing_postal_code + "\n";
		billInfo += billingCountry + "\n";
		billInfo += this.order.billing_phone;
		this.$.billLbl.setLabel(billInfo);
		
		this.order.products.each(function(p){
			if(showPrice(user))
				p.priceStr = "$"+parseFloat(p.price).toFixed(2);
			p.attrStr = "";
			if(! Object.isArray(p.data.attributes)){
				Object.keys(p.data.attributes).each(function(k){
					p.attrStr += k + ": " + p.data.attributes[k][0] + "\n" ;
				});
			}
		});
		this.$.productList.setItems(this.order.products);
	},
	cleanup: function() {
		Ares.cleanupSceneAssistant(this);
	}
};